﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 反射
{
    public sealed class Singleton
    {
        private static Singleton instance = null;

        private Singleton()
        {
            Console.WriteLine("单例构造函数");
        }

        static Singleton()
        {
            instance=new Singleton();
        }

        public static Singleton GetInstance()
        {
            return instance;
        }
    }
}